require "import";
import "android.content.Context"
import "android.os.VibrationEffect"
import "android.os.Vibrator"
import "android.content.Intent"
context = activity or service
vibrator = context.getSystemService(Context.VIBRATOR_SERVICE)
vibrator.vibrate(100)

local on= "Mod Avion,Pornit*|Mod Avion,Activ*|Mod Avion, Activ*" 

local off= "Mod Avion,Oprit*|Mod Avion,Dezact*|Mod Avion, Dezact*" 


service.execute('Suspendare motor TTS principal')
if service.execute('setări rapide') then
service.postExecute(500, '', node, function()
if this.findAccessibilityNodeInfo(off) then
this.click({
{off .. ">5$0", 
'%返回<2'}
})
service.playSoundTick()
this.postSpeak(2300,  'Mod Avion, Activat. ')
service.postClick(2250,{
"%Suspendare motor TTS principal"})
elseif this.findAccessibilityNodeInfo(on) then
this.click({
{on .. ">5$0", 
'%返回<2'}
})
service.playSoundGestureEnd()
this.postSpeak(2300, ' Mod Avion, Dezactivat. ')

service.postClick(2250,{
"%Suspendare motor TTS principal"})
end
end)
return true
end